32_H-Bridge Motor Control Tests

Now that the motor power had been tested, a circuit for controlling the motor direction and speed with one PWM signal and one directional signal needed to be designed.  A development PCB hadn’t been made for our H-bridge component yet, but because it is almost identical in functionality to other dual H-bridge chips, I used a TI SN754410NE from our stockroom to test this circuit.

In our Microprocessors course, we used a circuit similar to that shown in Figure 1 to have bidirectional speed control of DC motors.  As the circuit is set up in Figure 1, only one motor can be controller, but the right side of the chip can support another motor.  

The left H-bridge on the chip has one pair of input motor control signals (1A, 2A) and one pair of output motor power signals (1Y, 2Y).  Vcc1 is logic-level power for the chip, and Vcc2 is the motor-level power.  1,2E is simply and enable pin for the left-side H-bridge.  The way the H-bridge functions is it outputs a HIGH signal on the xY pin when its corresponding xA pin is HIGH and LOW when xA is LOW.  If a PWM signal is applied to xA, then xY will be a PWM signal with a Vmax equal to Vcc2.

Controlling a motor with two of these xY outputs allows the motor direction to be changed by simply reversing the xA inputs’ values.  In order to use a PWM signal with bidirectional control, one xA could be held LOW while the other is given PWM.  To reverse direction, the first xA would be given PWM and the second one held LOW.  This is accomplished using one PWM and a direction control signal using 2 AND gates and one NOT for every motor, as shown in Figure 1

I built and tested this circuit, and, after some minor debugging found it to be functioning as expected.  For the PWM signal, I used a 5V square-wave from the Elvis Board; it only allowed for one motor speed though.  Using a circuit like this, all that is needed from the dsPIC for bidirectional speed control is one PWM signal and one HIGH/LOW signal for each motor.
Figure 1:  Circuit for Bi-direcitonal Motor Control With H-Bridges